define(function(require, exports, module) {
    var router = require("router");
    //var app = require("app");
    var controller = {};
    controller.vue = function() {
        controller.vm = new Vue({
            router: router,
            data: function() {
                return {  
                   data:'',
                   popup3:0,
                    remark:'',
                    refund_money:0
                };
            },
            el: '#pageEatInHallOrder',
            created: function() {
                this.fetchData();
            },
            methods: {
                fetchData: function() {
                    this.loadOrder();
                    
                } ,
                 setData:function(arr){
                  for( var i in arr){
                     this[i] = arr[i];
                  }
             },

                loadOrder(reload = 0) {
                  var that = this;                  
                  app.get("apiv2/order/find", {
                    order_sn: this.$route.params.order_sn
                  }, function (res) {
                    that.loading = 0;
                    if (res.code != 200) {
                      app.alert(res.msg);
                      return;
                    }
                    that.data= res.data;
                     
                  });
                }, 
                topay:function(order_sn){
                  app.pay(order_sn);
                }
               
 
            }

        }).$mount('#app');
    };
    module.exports = controller;
});
